<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <input type="text" v-model="msg">
        <h1>{{msg}}</h1>

        <select v-model="msg2">
            <option value="1">牛奶</option>
            <option value="2">榴莲</option>
            <option value="3">黄辉冯</option>
        </select>

        <h1>{{msg2}}</h1>
    </div>
</body>

</html>
<script src='https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js'></script>
<script>
    //v-model 在表单元素或者组件创建双向绑定
    //使用v-model的敲门就是 以后看到input select这类元素 肯定要加v-model
    let vm = new Vue({
        el: "#app",
        data: {
            msg: '榴莲',
            msg2:""
        }
    })
</script>